package com.lg.feign.controller;

import com.lg.feign.service.StudentFeignService;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
public class StudentFeignController {
    @Resource
    StudentFeignService studentFeignService;

    @GetMapping("/students")

    public String getAllStudents() {
        return studentFeignService.getAllStudents();
    }

    @RequestMapping(value = "/student/{sno}",method = RequestMethod.POST)


    public String getStudentBySno(@PathVariable("sno") String sno) {
        return studentFeignService.getStudentBySno(sno);
    }
}
